<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../../CSS/common.css">
		<script type="text/javascript" src="../../../../JS/common.js"></script>
		<script type="text/javascript" src="../../../../JS/jquery.min.js"></script>
		<script type="text/javascript" src="../../../../JS/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../../../JS/map.js"></script>
		<style>
			.right_postion {
				position: absolute;
				left: 750px;
				color: blue;
				font-weight: 300;
			}
			
			.left_postion {
				position: absolute;
				left: 40px;
				color: blue;
				font-weight: 300;
			}
			
			#maptitle {
				color: blue;
				font-weight: 600;
				font-size: 15px;
				margin-left: 340px;
				margin-top: 50px;
			}
		</style>
	</head>

	<body style="height: 100%;">
		<div style="text-align: left; ">
			<p id="maptitle"></p>
			<div id="left_top" class="left_postion"></div>
			<div id="right_top" class="right_postion"></div>
			<img src="../../../../images/map/map-3-2/1号大棚.jpg" usemap="#1" style="border-style:none;width: 812px;height: 507px;" />
			<map id="1" name="1">
			</map>
			<div id="left_bottom" class="left_postion"></div>
			<div id="right_bottom" class="right_postion"></div>
		</div>
	</body>
	<script type="text/javascript">
		var _left_top_num = 0;
		var _left_bottom_num = 0;
		var _right_top_num = 0;
		var _right_bottom_num = 0;
		var _tmp = "1";
		//		var _tmp = getID();

		var _topAreaData = new Object();
		var _bottomAreaData = new Object();
		_topAreaData.len = 12;//摊位个数
		_topAreaData.x1 = 585;//第一排最后一个矩形左上角x坐标
		_topAreaData.y1 = 125;//第一排最后一个矩形左上角y坐标
		_topAreaData.x2 = 615;//第一排最后一个矩形右下角x坐标
		_topAreaData.y2 = 170;//第一排最后一个矩形右下角y坐标
		_topAreaData.offset = 37;//hover之间的间隔
		_topAreaData.type = "horizontal"; //水平方向
		_topAreaData.firstnum = 13;//摊位标号

		_bottomAreaData.len = 12;//同上
		_bottomAreaData.x1 = 585;
		_bottomAreaData.y1 = 200;
		_bottomAreaData.x2 = 615;
		_bottomAreaData.y2 = 255;
		_bottomAreaData.offset = 37;
		_bottomAreaData.type = "horizontal"; //水平方向
		_bottomAreaData.firstnum = 1;

		var _topData = CreateAreaData(_topAreaData);
		var _bottomData = CreateAreaData(_bottomAreaData);
		var areacontent = CreateAreaHTML(_topData);
		$("#1").append(areacontent);
		var areacontent = CreateAreaHTML(_bottomData);
		$("#1").append(areacontent);
		modiAreaTitle();
//		getTipNum();

//		function getTipNum() {
//			console.log("开始执行!");
//			var bh = parseInt(_tmp.substring(0, 1));
//			_left_bottom_num = (bh - 1) * 40 + 20;
//			_right_bottom_num = (bh - 1) * 40 + 1;
//			_left_top_num = (bh - 1) * 40 + 40;
//			_right_top_num = (bh - 1) * 40 + 21;
//			$("#left_bottom").html(_left_bottom_num);
//			$("#right_bottom").html(_right_bottom_num);
//			$("#left_top").html(_left_top_num);
//			$("#right_top").html(_right_top_num);
//			$("#maptitle").html("蔬菜批发区" + bh + "号大棚");
//
//		}
		
		//改成从第一排的编号开始
		function modiAreaTitle() {
			for(var i = 13; i < 14; i++) {
				var _id = "area" + i;
				var _plocation = getLocation(i);
				console.log(_plocation);
				document.getElementById(_id).setAttribute("title", _plocation);
			}

		}

		function getLocation(_num) {
			var bh = _tmp.substring(0, 1);
			console.log(bh);
			var boost_num = (parseInt(bh) - 1) * 40 + _num;
			var _location = "水果批发区" + _tmp + "门牌号" + boost_num;
			return _location;
		}

		$(function() {
			$("area").each(function(index, element) {
				showTips($(this), "");
			});
		});
		////查看商铺的详细信息
		function BoostDetail() {
			console.log("查看商铺详细信息");
		}
	</script>

</html>